<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<input type="hidden" id="totalPages" value="${page.totalPages}"/>
<input type="hidden" id="currentPage" value="${page.currentPage}"/>

<!--公共无数据提示 开始-->
<section class="no-data__wrap no-cards-data__wrap" th:if="${#lists.isEmpty(dataMap['list'])}">
    <em>&nbsp;</em>
    <p>亲，还没有礼卡哦~~~</p>
</section>
<!--公共无数据提示 结束-->

<li th:if="${!#lists.isEmpty(dataMap['list'])}" th:each="giftCardList:${dataMap['list']}">
    <section class="cards__wrap cards-yh-red__wrap" th:if="${giftCardList['cardType']==2}">
        <div class="cards-yh">
            <aside>
                <section><span>课程卡</span><span class="fs4">（附赠课程）</span></section>
                <th:block th:each="course:${giftCardList['giftCard']['courseList']}">
                    <div>
                        <span class="fs7 vam">· </span> <span class="fs4" th:text="${course['courseName']}"></span>
                    </div>
                </th:block>
            </aside>
            <aside class="pt5" th:if="${giftCardList['useType']==2}">
                <button disabled="disabled" class="button button-big button-round"> 已激活 </button>
            </aside>
            <aside class="pt5" th:if="${giftCardList['useType']==1}">
                <a href="javascript:void (0);" th:attr="data-id=${giftCardList['id']}" class="button button-big button-round activation"> 激活 </a>
            </aside>
        </div>
        <div class="cards-course-footer">
            <span class="">卡号：</span>
            <span class="" th:text="${giftCardList['code']}"></span>
            <span class="ml5">密码：</span>
            <span class="" th:text="${giftCardList['codePwd']}"></span>
        </div>
    </section>
</li>
<li th:if="${!#lists.isEmpty(dataMap['list'])}" th:each="giftCardList:${dataMap['list']}">
    <section class="cards__wrap cards-yh-green__wrap" th:if="${giftCardList['cardType']==3}">
        <div class="cards-yh">
            <aside>
                <section>
                    <span>充值卡</span>
                    <!--
                    <small th:text="${giftCardList['giftCard']['endTime']}!=null?'有效期至：' + ${#strings.substring(giftCardList['giftCard']['endTime'],0,10)} : '无期限'"></small>
                    -->
                </section>
                <span class="fs6">￥</span>
                <span class="uAccount-number">
                    <b th:text="${giftCardList['giftCard']['amount']}"></b>
                </span>
            </aside>
            <aside class="pt5" th:if="${giftCardList['useType']==2}">
                <button disabled="disabled" class="button button-big button-round"> 已激活 </button>
            </aside>
            <aside class="pt5" th:if="${giftCardList['useType']==1}">
                <a href="javascript:void (0);" th:attr="data-id=${giftCardList['id']}" class="button button-big button-round activation"> 激活 </a>
            </aside>
        </div>
    </section>
</li>
<li th:if="${!#lists.isEmpty(dataMap['list'])}" th:each="giftCardList:${dataMap['list']}">
    <section class="cards__wrap cards-yh-blue__wrap" th:if="${giftCardList['cardType']==1}">
        <div class="cards-yh">
            <aside>
                <section><span>学员卡</span></section>
                <span class="fs6">￥</span>
                <span class="uAccount-number">
                    <b th:text="${giftCardList['giftCard']['amount']}"></b>
                </span>
            </aside>
            <aside class="pt5" th:if="${giftCardList['useType']==2}">
                <button disabled="disabled" class="button button-big button-round"> 已激活 </button>
            </aside>
            <aside class="pt5" th:if="${giftCardList['useType']==1}">
                <a href="javascript:void (0);" th:attr="data-id=${giftCardList['id']}" class="button button-big button-round activation"> 激活 </a>
            </aside>
        </div>
    </section>
</li>
<input type="hidden" id="totalPages" th:value="${dataMap['pages']}"/>
<input type="hidden" id="currentPage" th:value="${dataMap['pageNum']}"/>
</html>